package cn.jdy.plugins.entity;

import cn.jdy.authority.entity.User;
import cn.jdy.common.bo.BaseEntry;
import cn.jdy.platform.entity.ConfValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import org.hibernate.annotations.GenericGenerator;

/**
 * 
 * @author LuTan
 * 页签实体
 */
@Entity
public class Label extends BaseEntry {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
	private String id;//主键
	
	private String name; // 页签名称
	
	private String userid;//线路所有人
	
	private String sort;
	
	private Long labelid; // 标识;
	
	@OneToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "labelid",insertable = false, updatable = false)
	private ConfValue confvalue;
	
	private Long liveid; // 标识;
	
	@OneToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "liveid",insertable = false, updatable = false)
	private Live live;

	public Live getLive() {
		return live;
	}

	public void setLive(Live live) {
		this.live = live;
	}

	

	public Long getLabelid() {
		return labelid;
	}

	public void setLabelid(Long labelid) {
		this.labelid = labelid;
	}

	public Long getLiveid() {
		return liveid;
	}

	public void setLiveid(Long liveid) {
		this.liveid = liveid;
	}

	public ConfValue getConfvalue() {
		return confvalue;
	}

	public void setConfvalue(ConfValue confvalue) {
		this.confvalue = confvalue;
	}

	@OneToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "userid", insertable = false, updatable = false)
	private User user;

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}
}
